package org.whatever.aha.zjut.platform.util;

import org.whatever.aha.zjut.base.constant.ErrorCode;
import org.whatever.aha.zjut.base.exception.AppException;

/**
 * @author Vc
 * @version 1.0
 * @Desc
 * @date 2021/10/10 23:10
 */
public class StatusConvertUtil {
    public static String convertProjectApplicationStatus(int statusId){
        switch (statusId){
            case 1:
                return "待审核";
            case 2:
                return "审核不通过";
            case 3:
                return "审核通过";
            default: throw new AppException(ErrorCode.ILLEGAL_PROJECT_APP_STATUS);
        }
    }

    public static String convertProjectStuStatus(int statusId){
        switch (statusId){
            case 1:
                return "待提交";
            case 2:
                return "已提交";
            case 3:
                return "已退回";
            case 4:
                return "已完结";
            default: throw new AppException(ErrorCode.ILLEGAL_PROJECT_STU_STATUS);
        }
    }

    public static String convertRole(int RoleId){
        switch (RoleId){
            case 1:
                return "学生";
            case 2:
                return "评委";
            case 3:
                return "院级管理员";
            case 4:
                return "校级管理员";
            case 5:
                return "超级管理员";
            default: throw new AppException(ErrorCode.ILLEGAL_PROJECT_STU_STATUS);
        }
    }

    public static String convertCompName(int compType){
        switch (compType){
            case 1:
                return "运河杯立项-结题";
            case 2:
                return "运河杯竞赛";
            case 3:
                return "浙江省新苗";
            case 4:
                return "挑战杯专项赛";
            default: throw new AppException(ErrorCode.ILLEGAL_COMPETITION_NAME);
        }
    }

    public static String convertCompStatus(int compStatus){
        switch (compStatus){
            case 1:
                return "NotCommenced";
            case 2:
                return "Ongoing";
            case 3:
                return "Completed";
            default: throw new AppException(ErrorCode.ILLEGAL_COMPETITION_STATUS);
        }
    }

    public static String convertProjectAcademyStatus(int projectAcademyStatus){
        switch (projectAcademyStatus){
            case 1 :
                return "不可见";
            case 2:
                return "未审核";
            case 3:
                return "退回修改";
            case 4:
                return "已审核";
            default: throw new AppException(ErrorCode.ILLEGAL_PROJECT_ACADEMY_STATUS);
        }
    }

    public static String convertProjectSchoolStatus(int projectSchoolStatus){
        switch (projectSchoolStatus){
            case 1 :
                return "不可见";
            case 2:
                return "未审核";
            case 3:
                return "退回修改";
            case 4:
                return "已审核";
            default: throw new AppException(ErrorCode.ILLEGAL_PROJECT_ACADEMY_STATUS);
        }
    }

    public static String convertProjectAwards(int projectAwardId){
        switch (projectAwardId){
            case 0:
                return "特等奖";
            case 1 :
                return "一等奖";
            case 2:
                return "二等奖";
            case 3:
                return "三等奖";
            case 4:
                return "三等奖";
            case 5:
                return "鼓励奖";
            default: throw new AppException(ErrorCode.ILLEGAL_PROJECT_ACADEMY_STATUS);
        }
    }
}
